VC10Calendar

V = Variables

C = Calculation functions

The VC10Calendar function calculates the day of the week (iin numerical form see the Note) starting from the date expressed as day, month and year starting from 1/1/2000.
The function sets a negative value if you passed a wrong topic. The value determines the type of error.

IMPLEMENTATION

VC10Calendar (day, month, year, numday)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN SYSTEM day L Number of the day (1÷31)
IN SYSTEM month L Number of the month (1÷12)
IN SYSTEM year L Year - 4 digits - (from 2000 onwards)
OUT SYSTEM numday L Day of the week expressed in number:
0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday

Error

If there was any data entry error would be reported on the numday variable with negative values. In particular:
-1 = error in entering the day
-2 = error in entering the month
-3 = error in entering the year
-4 = error in entering the day February month

Esempio

Nell'esempio, se il giorno della settimana del 19 giugno 2002 è mercoledì, si attiva l'uscita 'ofUscita'.

giorno = 19
mese = 6
anno = 2002
VC10Calendar (giorno, mese, anno, numgiorno)
IF (numgiorno EQ 3)
	SETOUT ofUscita
ENDIF

Note